<template>
  <div id="app">
    <router-view></router-view>
    <FooterGuide v-show="$route.meta.showFooter"/>   
    <!-- v-show在路由中定义meta 中定义showfooter属性  来显示隐藏footer组件在不同路由的显示问题 -->
  </div>
</template>
<script>
import {mapActions} from 'vuex'
import FooterGuide from './components/FooterGuide/FooterGuide.vue'


export default {
  
  //   async mounted() {  //发请求一般在这里发
  //   const result = await reqFoodCategorys()  
  //   console.log(result)    测试接口
  // },
    mounted () {
      // this.$store.dispatch('getAddress')
      this.getAddress()
      this.getUserInfo()
    },

    methods: {
      ...mapActions(['getAddress', 'getUserInfo'])
    },

    components: {
      FooterGuide
    }
  
  }
</script>
<style lang="stylus" rel="stylesheet/stylus">
#app
  width 100%
  height 100%
  background #f5f5f5
</style>